﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterSite.Master" AutoEventWireup="true"
    CodeBehind="Admin.aspx.cs" EnableEventValidation="false" Inherits="WebGui.Admin.Admin" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="Content" runat="server">
    <h3>
        <asp:SqlDataSource ID="DropDownDataSource" runat="server" ConnectionString="<%$ ConnectionStrings:ApplicationServices %>"
            SelectCommand="SELECT [RoleId], [RoleName] FROM [vw_aspnet_Roles]"></asp:SqlDataSource>
        Opret brugere</h3>
    <asp:RequiredFieldValidator runat="server" ID="UserValidate" ControlToValidate="txtUserName"
        ErrorMessage="*"></asp:RequiredFieldValidator>
    <asp:RegularExpressionValidator runat="server" ID="emailValidate" ControlToValidate="txtUserName"
        ErrorMessage="*"></asp:RegularExpressionValidator>
    <asp:TextBox ID="txtUserName" runat="server"></asp:TextBox>
    <asp:DropDownList ID="DrRoleList" runat="server" DataSourceID="DropDownDataSource"
        DataTextField="RoleName" DataValueField="RoleId" Style="height: 20px">
    </asp:DropDownList>
    <asp:Button ID="btnCreateUser" runat="server" Text="Opret bruger" OnClick="BtnCreateUser_Click" />
    <asp:Label ID="lblCreateUserError" runat="server"></asp:Label>
    <br />
    <asp:Label ID="lblCreateUserInfo" runat="server"></asp:Label>
    <br />
    <h3>
        Bruger administration</h3>
    <asp:Label ID="lblNewPass" runat="server"></asp:Label>
    <asp:GridView ID="GvUsers" runat="server" AutoGenerateColumns="false" OnRowDeleting="GvUsers_RowDeleting"
        OnSelectedIndexChanged="GvUsers_RowSelecting" CssClass="gridview">
        <Columns>
            <asp:BoundField DataField="UserName" HeaderText="Bruger" />
            <asp:CommandField ButtonType="Button" ControlStyle-CssClass="buttons" DeleteText="Slet?"
                HeaderText="Bruger admin" ShowDeleteButton="true" ShowSelectButton="true" SelectText="Generer Kode" />
        </Columns>
    </asp:GridView>
</asp:Content>
<asp:Content runat="server" ID="Content3" ContentPlaceHolderID="HeadLine">
    <h1>
        Admin</h1>
</asp:Content>